﻿@model CatHouse.Models.AboutModel

@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.CurrentPage = "contentpage";
    ViewBag.Title = "Sửa nhân viên " + Model.Ten;
}
<div class="container">
    @using (Html.BeginForm())
    {
        @Html.AntiForgeryToken()

        <div class="form-horizontal">
            <h4>@Model.Ten</h4>
        <hr />
        @Html.ValidationSummary(true)
        @Html.HiddenFor(model => model.ID)

        <div class="form-group">
            @Html.LabelFor(model => model.Ten, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Ten)
                @Html.ValidationMessageFor(model => model.Ten)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.NgaySinh, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.TextBoxFor(model => model.NgaySinh, Model.NgaySinh.ToString("dd/MM/yyyy"))
                @Html.ValidationMessageFor(model => model.NgaySinh)
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(model => model.AnhChanDung, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.AnhChanDung)
                @Html.ValidationMessageFor(model => model.AnhChanDung)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Email, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Email)
                @Html.ValidationMessageFor(model => model.Email)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ThongTinCaNhan, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.ThongTinCaNhan)
                @Html.ValidationMessageFor(model => model.ThongTinCaNhan)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Facebook, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Facebook)
                @Html.ValidationMessageFor(model => model.Facebook)
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
            </div>
        </div>
    </div>
    }

    <div>
        @Html.ActionLink("Back to List", "Index")
    </div>
    @section Scripts{
        <script>
            $(document).ready(function() {
                $('#NgaySinh').datepicker({
                    format: 'dd/mm/yyyy',
                    startDate: '-3y',
                    changeMonth: true,
                    changeYear: true,
                    maxDate: '@DateTime.Today.AddYears(-15).ToShortDateString()'
                });
            });
        </script>
    }
    
</div>